package com.yy.yjbo.yjbonetbroadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import de.greenrobot.event.EventBus;

public class NetStateReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        boolean isNet = NetworkUtil.isConnected();
        System.out.println("===NetStateReceiver===当前网络状态===="+isNet);

//        NetStatusClass netStatusClass = new NetStatusClass();
//        if (isNet) {
//            netStatusClass.setStatus(ConstantValue.Net_open);
//            EventBus.getDefault().post(netStatusClass);
//        }else {
//            netStatusClass.setStatus(ConstantValue.Net_close);
//            EventBus.getDefault().post(netStatusClass);
//        }
    }
}